// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010  Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.



#include "stdpch.h"
#include "character_title.h"
#include "nel/misc/common.h"
#include "nel/misc/string_conversion.h"

namespace CHARACTER_TITLE
{

	NL_BEGIN_STRING_CONVERSION_TABLE (ECharacterTitle)
		NL_STRING_CONVERSION_TABLE_ENTRY(Refugee)
		NL_STRING_CONVERSION_TABLE_ENTRY(Homin)
		NL_STRING_CONVERSION_TABLE_ENTRY(Novice_Artisan)
		NL_STRING_CONVERSION_TABLE_ENTRY(Novice_Warrior)
		NL_STRING_CONVERSION_TABLE_ENTRY(Novice_Harvester)
		NL_STRING_CONVERSION_TABLE_ENTRY(Novice_Magician)
		NL_STRING_CONVERSION_TABLE_ENTRY(Artisan_Apprentice)
		NL_STRING_CONVERSION_TABLE_ENTRY(Magician_Apprentice)
		NL_STRING_CONVERSION_TABLE_ENTRY(Defensive_Magician)
		NL_STRING_CONVERSION_TABLE_ENTRY(Offensive_Magician)
		NL_STRING_CONVERSION_TABLE_ENTRY(Mentalist)
		NL_STRING_CONVERSION_TABLE_ENTRY(Summoner)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Of_Illusion)
		NL_STRING_CONVERSION_TABLE_ENTRY(Mind_Lord)
		NL_STRING_CONVERSION_TABLE_ENTRY(Healer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Priest)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Of_Life)
		NL_STRING_CONVERSION_TABLE_ENTRY(Celestial_Guardian)
		NL_STRING_CONVERSION_TABLE_ENTRY(Disturber)
		NL_STRING_CONVERSION_TABLE_ENTRY(Affliction_Bringer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Of_Torment)
		NL_STRING_CONVERSION_TABLE_ENTRY(Avatar_Of_Sorrow)
		NL_STRING_CONVERSION_TABLE_ENTRY(Destroyer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Archmage)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Of_Pain)
		NL_STRING_CONVERSION_TABLE_ENTRY(Avatar_Of_Destruction)
		NL_STRING_CONVERSION_TABLE_ENTRY(Elementalist)
		NL_STRING_CONVERSION_TABLE_ENTRY(Alchemist)
		NL_STRING_CONVERSION_TABLE_ENTRY(Biomancer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Of_Energies)
		NL_STRING_CONVERSION_TABLE_ENTRY(Chosen_Of_Atys)
		NL_STRING_CONVERSION_TABLE_ENTRY(Warrior_Apprentice)
		NL_STRING_CONVERSION_TABLE_ENTRY(Melee_Warrior)
		NL_STRING_CONVERSION_TABLE_ENTRY(Range_Fighter)
		NL_STRING_CONVERSION_TABLE_ENTRY(Light_Armsman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Heavy_Armsman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Close_Fighter)
		NL_STRING_CONVERSION_TABLE_ENTRY(Gunman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Heavy_Gunman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Gunman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Heavy_Gunman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Bludgeoner)
		NL_STRING_CONVERSION_TABLE_ENTRY(Skewerer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Slasher)
		NL_STRING_CONVERSION_TABLE_ENTRY(Smasher)
		NL_STRING_CONVERSION_TABLE_ENTRY(Impaler)
		NL_STRING_CONVERSION_TABLE_ENTRY(Cleaver)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Close_Fighter)
		NL_STRING_CONVERSION_TABLE_ENTRY(Maceman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Brute)
		NL_STRING_CONVERSION_TABLE_ENTRY(Spearman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Axeman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Swordsman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Heavy_Maceman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Pikeman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Heavy_Axeman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Heavy_Swordsman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Knifeman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Hand_To_Hand_Fighter)
		NL_STRING_CONVERSION_TABLE_ENTRY(Bowman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Pistoleer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Heavy_Bowman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Artilleryman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Rifleman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Maceman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Brute)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Spearman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Axeman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Swordsman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Heavy_Maceman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Pikeman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Heavy_Axeman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Heavy_Swordsman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Knifeman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Hand_To_Hand_Fighter)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Bowman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Pistoleer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Heavy_Bowman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Artilleryman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Rifleman)
		NL_STRING_CONVERSION_TABLE_ENTRY(Armorer_Apprentice)
		NL_STRING_CONVERSION_TABLE_ENTRY(Jeweler_Apprentice)
		NL_STRING_CONVERSION_TABLE_ENTRY(Melee_Weapon_Smith_Apprentice)
		NL_STRING_CONVERSION_TABLE_ENTRY(Range_Weapon_Smith_Apprentice)
		NL_STRING_CONVERSION_TABLE_ENTRY(Heavy_Armorer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Light_Armorer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Medium_Armorer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Shield_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Jeweler)
		NL_STRING_CONVERSION_TABLE_ENTRY(Melee_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Melee_Heavy_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Melee_Light_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Range_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Range_Heavy_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Heavy_Armorer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Light_Armorer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Medium_Armorer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Shield_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Jeweler)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Melee_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Melee_Heavy_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Melee_Light_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Range_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Range_Heavy_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Heavy_Armorer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Light_Armorer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Medium_Armorer)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Shield_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Jeweler)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Melee_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Melee_Heavy_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Melee_Light_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Range_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Range_Heavy_Weapon_Smith)
		NL_STRING_CONVERSION_TABLE_ENTRY(Heavy_Armorer_Master)
		NL_STRING_CONVERSION_TABLE_ENTRY(Light_Armorer_Master)
		NL_STRING_CONVERSION_TABLE_ENTRY(Medium_Armorer_Master)
		NL_STRING_CONVERSION_TABLE_ENTRY(Shield_Smith_Master)
		NL_STRING_CONVERSION_TABLE_ENTRY(Jeweler_Master)
		NL_STRING_CONVERSION_TABLE_ENTRY(Melee_Weapon_Smith_Master)
		NL_STRING_CONVERSION_TABLE_ENTRY(Melee_Heavy_Weapon_Smith_Master)
		NL_STRING_CONVERSION_TABLE_ENTRY(Melee_Light_Weapon_Smith_Master)
		NL_STRING_CONVERSION_TABLE_ENTRY(Range_Weapon_Smith_Master)
		NL_STRING_CONVERSION_TABLE_ENTRY(Range_Heavy_Weapon_Smith_Master)
		NL_STRING_CONVERSION_TABLE_ENTRY(Forager_Apprentice)
		NL_STRING_CONVERSION_TABLE_ENTRY(Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Desert_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Forest_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Jungle_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Lacustre_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Prime_Roots_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Desert_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Forest_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Jungle_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Lacustre_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Advanced_Prime_Roots_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Desert_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Forest_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Jungle_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Lacustre_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Expert_Prime_Roots_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Desert_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Forest_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Jungle_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Lacustre_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Master_Prime_Roots_Forager)
		NL_STRING_CONVERSION_TABLE_ENTRY(Kami_Ally)
		NL_STRING_CONVERSION_TABLE_ENTRY(Karavan_Ally)

		NL_STRING_CONVERSION_TABLE_ENTRY(Title00000)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00001)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00002)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00003)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00004)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00005)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00006)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00007)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00008)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00009)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00010)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00011)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00012)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00013)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00014)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00015)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00016)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00017)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00018)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00019)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00020)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00021)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00022)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00023)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00024)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00025)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00026)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00027)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00028)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00029)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00030)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00031)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00032)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00033)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00034)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00035)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00036)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00037)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00038)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00039)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00040)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00041)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00042)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00043)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00044)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00045)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00046)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00047)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00048)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00049)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00050)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00051)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00052)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00053)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00054)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00055)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00056)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00057)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00058)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00059)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00060)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00061)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00062)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00063)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00064)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00065)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00066)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00067)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00068)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00069)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00070)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00071)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00072)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00073)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00074)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00075)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00076)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00077)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00078)
		NL_STRING_CONVERSION_TABLE_ENTRY(Title00079)

		NL_STRING_CONVERSION_TABLE_ENTRY(FBT)

		NL_STRING_CONVERSION_TABLE_ENTRY(SGM)
		NL_STRING_CONVERSION_TABLE_ENTRY(GM)
		NL_STRING_CONVERSION_TABLE_ENTRY(VG)
		NL_STRING_CONVERSION_TABLE_ENTRY(SG)
		NL_STRING_CONVERSION_TABLE_ENTRY(G)
		NL_STRING_CONVERSION_TABLE_ENTRY(CM)
		NL_STRING_CONVERSION_TABLE_ENTRY(EM)
		NL_STRING_CONVERSION_TABLE_ENTRY(EG)
		NL_STRING_CONVERSION_TABLE_ENTRY(OBSERVER)

		NL_END_STRING_CONVERSION_TABLE(ECharacterTitle, CharacterTitlesConversion, NB_CHARACTER_TITLE)

	std::string toString (const ECharacterTitle &r)
	{
		return CharacterTitlesConversion.toString(r);
	}

	ECharacterTitle toCharacterTitle (const std::string& ct)
	{
		return CharacterTitlesConversion.fromString(ct);
	}

} // CHARACTER_TITLE
